home *** CD-ROM | disk | FTP | other *** search
- Path: news.uni-ulm.de!news
- From: gutmann@informatik.uni-ulm.de (Jens-Steffen Gutmann)
- Newsgroups: comp.sys.amiga.programmer
- Subject: slink V6.56 problem
- Date: 15 Jan 1996 12:35:00 GMT
- Organization: University of Ulm, Germany
- Message-ID: <4ddhlk$hms@oracle.rz.uni-ulm.de>
- Reply-To: gutmann@informatik.uni-ulm.de
- NNTP-Posting-Host: gaius.informatik.uni-ulm.de
-
- Slink V6.56 seems to have problems when linking large object files.
- I noticed it when trying to recompile the gnuplot source code.
- Here is some code to produce a large source file:
-
- ----------------------------cut-here--------------------------------------
- #include <stdio.h>
-
- int main(int argc, char **argv)
- {
- int i;
-
- printf("#include <stdio.h>\n\n");
-
- for(i=0; i < 2000; i++)
- printf("void test%d(void) { printf(\"Test%d\\n\"); }\n", i, i);
-
- printf("\nint main(int argc, char **argv)\n{ return(0); }\n");
- return(0);
- }
- ----------------------------cut-here--------------------------------------
-
- Save this code to a file genprob.c and compile and link it:
-
- --------------------------------------------------------------------------
- Home:Prog/problems/linker > sc link genprob.c
- SAS/C Amiga Compiler 6.56
- Copyright (c) 1988-1995 SAS Institute Inc.
- Slink - Version 6.56
- Copyright (c) 1988-1995 SAS Institute, Inc. All Rights Reserved.
-
-
- SLINK Complete - Maximum code size = 5936 ($00001730) bytes
-
- Final output file size = 5952 ($00001740) bytes
- --------------------------------------------------------------------------
-
- Execute the new binary and save the output to linkprob.c:
-
- --------------------------------------------------------------------------
- Home:Prog/problems/linker > genprob > linkprob.c
- --------------------------------------------------------------------------
-
- Now try to compile and link it:
-
- --------------------------------------------------------------------------
- Home:Prog/problems/linker > sc link linkprob.c
- SAS/C Amiga Compiler 6.56
- Copyright (c) 1988-1995 SAS Institute Inc.
- Slink - Version 6.56
- Copyright (c) 1988-1995 SAS Institute, Inc. All Rights Reserved.
-
- Error 502: __writes symbol - Distance for Reloc16 > 32768
-
- First Reference in Unit linkprob.c at offset 00005ac2 in file 'linkprob.o'
- To Unit writes.c at offset 00004350 in file 'LIB:sc.lib'
- Home:Prog/problems/linker >
- --------------------------------------------------------------------------
-
- The SCOPTIONS file contains:
-
- --------------------------------------------------------------------------
- Home:Prog/problems/linker > cat SCOPTIONS
- CODE=FAR
- ERRORREXX
- NOGENPROTODATAITEMS
- GLOBALSYMBOLTABLE=include:all.gst
- --------------------------------------------------------------------------
-
- Same results without CODE=FAR.
-
- If I try to compile and link with SASC 6.55 everything works fine:
-
- --------------------------------------------------------------------------
- Home:Prog/problems/linker > sc link linkprob.c
- SAS/C Amiga Compiler 6.55
- Copyright (c) 1988-1995 SAS Institute Inc.
- ***Can't open GST file "include:all.gst" for read
- Slink - Version 6.55
- Copyright (c) 1988-1995 SAS Institute, Inc. All Rights Reserved.
-
-
- SLINK Complete - Maximum code size = 85128 ($00014c88) bytes
-
- Final output file size = 101192 ($00018b48) bytes
- --------------------------------------------------------------------------
-
- The only chance to link with V6.56 is to split the large source
- code into smaller pieces.
-
- Are there any workarounds other then splitting source code
- into smaller pieces?
-
-
- Steffen Gutmann
-
- --
- gutmann@informatik.uni-ulm.de
-
-
-